package com.sky.mapper;


import com.sky.annotation.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryMapper {
    List<Category> listCategory(String list);

    @AutoFill(OperationType.INSERT)
    void addCategory(Category category);

    @AutoFill(OperationType.UPDATE)
    void updateCategory(Category category);

    void deleteCategory(String id);

    List<Category> pageCategory(@Param("name") String name, @Param("type") String type);

    //@AutoFill(OperationType.UPDATE)
    void updateStatus(@Param("status") String status, @Param("id") Long id,
                      @Param("currentId") Long currentId);
}
